 import request from '@/utils/request'

  // 创建教师志愿
  export const addTeacherVolunteer = (data) => {
    return request({
      url: '/system/teacherVolunteer',
      method: 'post',
      data: data
    })
  }

  // 更新教师志愿
  export const updateTeacherVolunteer = (data) => {
    return request({
      url: '/system/teacherVolunteer',
      method: 'put',
      data: data
    })
  }

  // 查询教师志愿列表
  export const listTeacherVolunteer = (query) => {
    return request({
      url: '/system/teacherVolunteer/list',
      method: 'get',
      params: query
    })
  }

  // 查询教师志愿详情（根据分组ID和教师ID）
  export const getTeacherVolunteer = (groupId, teacherId) => {
    return request({
      url: '/system/teacherVolunteer/' + groupId + '/' + teacherId,
      method: 'get'
    })
  }
  export const getTeacher = (teacherId) => {
    return request({
      url: '/system/teacherVolunteer/' + teacherId,
      method: 'get'
    })
  }
  // 删除教师的某些志愿
  export const delTeacherVolunteer = (data) => {
    return request({
      url: '/system/teacherVolunteer',
      method: 'delete',
      data: data
    })
  }

  // 删除教师在某个分组的所有志愿
  export const delAllTeacherVolunteer = (groupId, teacherId) => {
    return request({
      url: '/system/teacherVolunteer/' + groupId + '/' + teacherId,
      method: 'delete'
    })
  }